<template>
	<view class="">
		<navBar :title="title" />
		<iframe v-if="type == 'user'" src="https://mobile.kuaibuapp.com/agreement" width="100%" :height="heightH">
			<p>Your browser does not support iframes.</p>
		</iframe>
		<iframe v-if="type == 'privacy'" src="https://mobile.kuaibuapp.com/PrivacyAgreement" width="100%" :height="heightH">
			<p>Your browser does not support iframes.</p>
		</iframe>
	</view>
</template>

<script>
	import navBar from '@/components/navbar/index'
export default {
	components:{
		navBar
	},
	data() {
		return {
			heightH: '',
			title: '',
			type: '',
			list: {
				'user': {
					url: 'https://mobile.kuaibuapp.com/agreement',
					title: '用户协议'
				},
				'privacy': {
					url: 'https://mobile.kuaibuapp.com/PrivacyAgreement',
					title: '隐私协议'
				}
			}
		}
	},
	created() {
		this.heightH = window.screen.height;
	},
	onLoad(option) {
		this.type = option.type;
		this.title = this.list[this.type].title;
	}
}
</script>

<style>
</style>
